namespace SharePoint.ImportExport.Core
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// Initializes a new instance of the SPExportException class.
    /// </summary>
    /// <example>
    /// <code>
    /// throw new SPExportException("A List must have its type defined");
    /// </code>
    /// </example>
    [Serializable()]
    public class SPExportException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the SPExportException class
        /// </summary>
        /// <param name="message">This is the error message</param>
        public SPExportException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the SPExportException class
        /// </summary>
        /// <param name="message">This is the error message</param>
        /// <param name="ex">This is the base exception</param>
        public SPExportException(string message, Exception ex)
            : base(message, ex)
        {
        }

        /// <summary>
        /// Initializes a new instance of the SPExportException class
        /// </summary>
        public SPExportException()
        {
        }
        
        /// <summary>
        /// Initializes a new instance of the SPExportException class
        /// </summary>
        /// <param name="serializationInfo">This is the serialization info for the exception</param>
        /// <param name="streamingContext">This is the streaming context for the exception</param>
        protected SPExportException(SerializationInfo serializationInfo, StreamingContext streamingContext)
            : base(serializationInfo, streamingContext)
        {
        }
    }
}
